<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        console.log(Math.random());
        function gatRandom(min, max) {
            return Math.floor(Math.random() * (max - min + 1)) + min;
        }
        console.log(gatRandom(1, 10));
        var arr = ['red', 'purple', 'blue', 'pink', 'hotpink', 'yellow'];
        console.log(arr[gatRandom(0, arr.length - 1)]);
    </script>
</head>

<body>

</body>

</html>